package com.motu.monstercity.server.game.base;

public class GameConstant {
    public static final int ID_SECTION = 10000; // ID段

    //id 段配置 总的8位,前面2位表示类型
    public static final int REWARD_TYPE_PROP = 10;// 道具
    public static final int REWARD_TYPE_PARTNER = 50;// 干员伙伴
    public static final int REWARD_TYPE_MONSTER = 51;// 怪物
    public static final int REWARD_TYPE_WEAPON = 52;// 武器
    public static final int REWARD_TYPE_PET= 53;//宠物
    public static final int REWARD_TYPE_SECRETARY = 54;//秘书
    public static final int REWARD_TYPE_SON = 55;//子嗣
    public static final int REWARD_TYPE_BUILD = 56;// 建筑
    public static final int REWARD_TYPE_BUILD_SKIN = 57;// 建筑皮肤
    public static final int REWARD_TYPE_BOX = 58;// 宝箱
    public static final int REWARD_TYPE_SUIT = 59;// 角色皮肤/服装
    public static final int REWARD_TYPE_ROLE_DECORATE = 60;// 头像,头像框,称号,聊天气泡等装饰类
    public static final int REWARD_TYPE_CHIP_MAIN = 61;// 碎片
    public static final int REWARD_TYPE_ROLE_DECORATE2 = 62;// 头像,头像框,称号,聊天气泡等装饰类 客户端需求




    public static final int START_ID_PROP = ID_SECTION * REWARD_TYPE_PROP; // 道具 (100001,499999 货币100001--100099, 其他100100--499999)
    public static final int START_ID_PARTNER = ID_SECTION * REWARD_TYPE_PARTNER;// 伙伴类/干员(500001,509999)
    public static final int START_ID_MONSTER = ID_SECTION * REWARD_TYPE_MONSTER;// 怪物(510001,519999)
    public static final int START_ID_WEAPON = ID_SECTION * REWARD_TYPE_WEAPON; // 武器 (520001,529999)
    public static final int START_ID_PET = ID_SECTION * REWARD_TYPE_PET; // 宠物 (530001,539999)
    public static final int START_ID_SECRETARY = ID_SECTION * REWARD_TYPE_SECRETARY;// 秘书类(540001,549999)
    public static final int START_ID_SON = ID_SECTION * REWARD_TYPE_SON;// 子嗣类(550001,559999)
    public static final int START_ID_BUILD = ID_SECTION * REWARD_TYPE_BUILD; // 建筑类 (560001,569999)
    public static final int START_ID_BUILD_SKIN = ID_SECTION * REWARD_TYPE_BUILD_SKIN; // 建筑皮肤类 (570001,579999)
    public static final int START_ID_BOX = ID_SECTION * REWARD_TYPE_BOX; // 宝箱类 (580001,589999)
    public static final int START_ID_SUIT = ID_SECTION * REWARD_TYPE_SUIT; // 角色皮肤 (590001, 599999)
    public static final int START_ID_ROLE_DECORATE = ID_SECTION * REWARD_TYPE_ROLE_DECORATE; // 头像,头像框,称号,聊天气泡等装饰类 (600001, 609999)
    public static final int START_ID_ROLE_DECORATE2 = ID_SECTION * REWARD_TYPE_ROLE_DECORATE2; // 头像,头像框,称号,聊天气泡等装饰类 (620001, 629999)
    public static final int START_ID_CHIP_MAIN = 61000000; // 碎片 (61500001, 61549999)



    // item的类型,根据这个类型,操作不用的用户数据
    public static int getItemType(int itemId) {
        if (itemId > START_ID_PROP && itemId < START_ID_PARTNER) {
            return REWARD_TYPE_PROP; // 道具item 100001 -- 499999
        } else if (itemId > START_ID_PARTNER && itemId < START_ID_PARTNER + ID_SECTION) {
            return REWARD_TYPE_PARTNER; // 伙伴
        } else if (itemId > START_ID_MONSTER && itemId < START_ID_MONSTER + ID_SECTION) {
            return REWARD_TYPE_MONSTER; // 怪物
        } else if (itemId > START_ID_WEAPON && itemId < START_ID_WEAPON + ID_SECTION) {
            return REWARD_TYPE_WEAPON; // 武器
        } else if (itemId > START_ID_PET && itemId < START_ID_PET + ID_SECTION) {
            return REWARD_TYPE_PET; // 宠物
        } else if (itemId > START_ID_SECRETARY && itemId < START_ID_SECRETARY + ID_SECTION) {
            return REWARD_TYPE_SECRETARY; // 秘书
        } else if (itemId > START_ID_SON && itemId < START_ID_SON + ID_SECTION) {
            return REWARD_TYPE_SON; // 子嗣
        } else if (itemId > START_ID_BUILD && itemId < START_ID_BUILD + ID_SECTION) {
            return REWARD_TYPE_BUILD; // 建筑
        } else if (itemId > START_ID_BUILD_SKIN && itemId < START_ID_BUILD_SKIN + ID_SECTION) {
            return REWARD_TYPE_BUILD_SKIN; // 建筑皮肤
        } else if (itemId > START_ID_BOX && itemId < START_ID_BOX + ID_SECTION) {
            return REWARD_TYPE_BOX; // 宝箱
        } else if (itemId > START_ID_SUIT && itemId < START_ID_SUIT + ID_SECTION) {
            return REWARD_TYPE_SUIT; // 角色皮肤/服装
        } else if (itemId > START_ID_ROLE_DECORATE && itemId < START_ID_ROLE_DECORATE + ID_SECTION) {
            return REWARD_TYPE_ROLE_DECORATE; // 角色头像,头像框,称号等
        } else if (itemId > START_ID_CHIP_MAIN && itemId < START_ID_CHIP_MAIN + REWARD_TYPE_CHIP_MAIN  * ID_SECTION) {
            return REWARD_TYPE_CHIP_MAIN; // 碎片
        } else if (itemId > START_ID_ROLE_DECORATE2 && itemId < START_ID_ROLE_DECORATE2 + ID_SECTION) {
            return REWARD_TYPE_ROLE_DECORATE; // 角色头像,头像框,称号等
        }

        return 0;
    }


    // 好友系统 礼物状态
    public static final byte GIFT_STATUS_NULL = 0;// 没有礼物
    public static final byte GIFT_STATUS_UNGET = 1;// 未领取礼物
    public static final byte GIFT_STATUS_GET = 2;// 已领取礼物
}
